﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using VTR.Title.Business;

namespace VTR.TestClient
{
    class Program
    {
        static void Main(string[] args)
        {
            Title.Business.Business b = new Title.Business.Business("asheley");
            b.Title = new Title.DataAccess.Title();
            
            // get title types
            b.GetTitleTypes();
            var firstTitleType = b.TitleTypeList[0].Value;


            // Set up New Title
            b.Title.ApplicationDate = DateTime.Now;
            b.Title.OriginationState = "MO";
            b.Title.TitleSequence = "KS123456";
            b.Title.TitleTypeID = 1;
            b.Insert();

            // change title type
            b.Title.TitleTypeID = 2;
            b.Update();

            try
            {
                // change title type
                b.Title.TitleTypeID = 52;
                b.Update();

            }
            catch (Exception ex)
            {

                VTR.Core.Logging.LogEntry(ex.Message, ex);
            }

            b.Get(1);
            string tt = b.Title.TitleType.Value;


        }
    }
}
